import { defineStore } from 'pinia'
import { getListApi, getmodifyApi } from '@/api/MerAudit'
import { number } from 'echarts'

export const userAuditStore = defineStore('AuditStore', {
    state: () => {
        return {
            list: [],
            page: 1,
            pageSize: 5,
            total: ''
        }
    },
    getters: {

    },
    actions: {
        async getList() {
            const { data, total } = await getListApi({
                query: 2,
                query2: 0,
                page: this.page - 1,
                pageSize: this.pageSize,
            })
            this.total = total
            this.list = data
        },
        async getModify(row) {
            await getmodifyApi(row)
        }
    }
})